package milkproduction.to;

public class RowMilkTO {
	private int rowMilkNO;
	private String stockedDate;
	private double capacity;
	private String supplier;
	
	public RowMilkTO (){}

	public RowMilkTO(int rowMilkNO, String stockedDate, double capacity,
			String supplier) {
		super();
		this.rowMilkNO = rowMilkNO;
		this.stockedDate = stockedDate;
		this.capacity = capacity;
		this.supplier = supplier;
	}

	public int getRowMilkNO() {
		return rowMilkNO;
	}

	public void setRowMilkNO(int rowMilkNO) {
		this.rowMilkNO = rowMilkNO;
	}

	public String getStockedDate() {
		return stockedDate;
	}

	public void setStockedDate(String stockedDate) {
		this.stockedDate = stockedDate;
	}

	public double getCapacity() {
		return capacity;
	}

	public void setCapacity(double capacity) {
		this.capacity = capacity;
	}

	public String getSupplier() {
		return supplier;
	}

	public void setSupplier(String supplier) {
		this.supplier = supplier;
	}

	@Override
	public String toString() {
		return "RowMilkTO [rowMilkNO=" + rowMilkNO + ", stockedDate="
				+ stockedDate + ", capacity=" + capacity + ", supplier="
				+ supplier + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		long temp;
		temp = Double.doubleToLongBits(capacity);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + rowMilkNO;
		result = prime * result
				+ ((stockedDate == null) ? 0 : stockedDate.hashCode());
		result = prime * result
				+ ((supplier == null) ? 0 : supplier.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		RowMilkTO other = (RowMilkTO) obj;
		if (Double.doubleToLongBits(capacity) != Double
				.doubleToLongBits(other.capacity))
			return false;
		if (rowMilkNO != other.rowMilkNO)
			return false;
		if (stockedDate == null) {
			if (other.stockedDate != null)
				return false;
		} else if (!stockedDate.equals(other.stockedDate))
			return false;
		if (supplier == null) {
			if (other.supplier != null)
				return false;
		} else if (!supplier.equals(other.supplier))
			return false;
		return true;
	}

	
}
